package com.songqi.common.mybatis.core.dataobject;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Entity基类
 *
 * @author songqi(13776346982)
 */
@Data
public class BaseEntity implements Serializable
{
    private static final long serialVersionUID = 1L;



    /** 创建者用户名 */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    /** 创建时间 */

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /** 更新者用户名 */
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /** 更新时间 */

    @TableField(value = "update_Time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    /** 请求参数 */
    private transient Map<String, Object> params;



    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

}
